/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.hiddendanger.service.api;

import com.koron.common.bean.StaffBean;
import com.koron.common.domain.DataBean;
import com.koron.hiddendanger.domain.PerformancePlan;
import org.swan.bean.MessageBean;

import java.util.List;

public interface PerformancePlanService {
    /**
     * 提交检查计划
     * @param user
     * @param plan
     * @return
     */
    MessageBean<Integer> save(StaffBean user,PerformancePlan plan);

    /**
     * 根据指定条件获取检查计划列表
     *
     * @param user
     * @param name
     * @param planCreater
     * @param corpCode
     * @param gridCode
     * @param executors
     * @param planState
     * @param repeatType
     * @param start
     * @param rows
     * @return
     */
    MessageBean<DataBean<PerformancePlan>> queryByCondition(StaffBean user, String name, String planCreater, String corpCode, String gridCode, String executors,
                                                            Integer planState, Integer useState, Integer repeatType, Integer start, Integer rows);

    /**
     * 根据主键获取检查计划详情
     * @param id
     * @return
     */
    MessageBean<PerformancePlan> queryOne(String id);

    /**
     * 逻辑删除检查计划
     * @param id
     * @return
     */
    MessageBean<Integer> dummyRemove(StaffBean user,String id);

    /**
     * 查询所有的检查计划
     * @return
     */
    MessageBean<List<PerformancePlan>> queryAll(String cropCode,String userCode);


    /**
     * 暂停计划
     * @param id
     * @return
     */
    MessageBean<Boolean> pausePlan(String id);

    /**
     * 重新启动计划
     * @param id
     * @return
     */
    MessageBean<Boolean>  resumePlan(String id);

    /**
     * app端查询与自己相关的检查计划
     * @param code
     * @param start
     * @param rows
     * @return
     */
    MessageBean<DataBean<PerformancePlan>>appList(String code,Integer start,Integer rows);

    /**
     * PC端首页安全工作的安全计划列表接口
     * @param code
     * @param start
     * @param rows
     * @return
     */
    MessageBean<DataBean<PerformancePlan>> indexPerformancePlanList(String code,Integer start,Integer rows);

    MessageBean<Integer> batchCommit(StaffBean user, String corpCode, String title, String note, String approval, String  performancePlanIds);

    MessageBean<List<PerformancePlan>> getBusinessData(String businessIds);

    /**
     * 检查计划列表导出
     * @param user
     * @param corpCode
     * @param name
     * @param planCreater
     * @param gridCode
     * @param executors
     * @param useState
     * @param repeatType
     * @return
     */
    List<PerformancePlan> exportList(StaffBean user, String corpCode, String name, String planCreater, String gridCode, String executors, Integer useState, Integer repeatType);

}
